package com.example.demo.service;

import com.example.demo.entity.Favorites;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 收藏表 服务类
 * </p>
 *
 * @author Mr.sdy
 * @since 2024-06-05
 */
public interface IFavoritesService extends IService<Favorites> {
    //增加收藏
    Integer addFavorites(Favorites favorites) ;
    //查询指定文章收藏总数
    Integer countfavoriteByArticle(Integer articleId) ;
    //查询所有文章收藏
    List<Favorites> selectAllFavorites() ;
    //删除收藏
    Integer deleteFavorites(Favorites favorites) ;

    /**
     * 查询收藏
     * @param favorites
     * @return
     */
    List<Favorites> selectFavorites(Favorites favorites) ;
}
